package com.zp.singleton;

/**
 * @author zhpeng
 * @discription 懒加载，线程安全(速度慢)
 * @created 2021/9/3 14:05
 */
public class Singleton02 {
    private static Singleton02 singleton02;
    private Singleton02(){};
    public static synchronized Singleton02 getInstance(){
        if(singleton02 == null){
            singleton02 = new Singleton02();
        }
        return singleton02;
    }
}
